<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>阿拉膳（天津）健康科技集团</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="keyword" content="">
    <meta name="description" content="">
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body style="user-select: none">
<!--header-->
<div id="header"></div>
<!--面包屑导航-->
<div id="breadcrumb-box">
    <div id="breadcrumb">
        <div class="index-icon"></div>
        <ul class="breadcrumb-list">
            <li>新闻中心</li>
            <li class="triangle"><span></span></li>
            <li>集团新闻</li>
        </ul>
        <div class="search-btn"></div>
    </div>
</div>
<!--news main-->
<div id="news-main">
    <!--news main container-->
    <div id="news-main-container">
        <!--顶部样式设置-->
        <div class="header-bar-bg">
            <div class="w783 h45"></div>
        </div>
        <div class="news-header-img"></div>
        <!--主要内容-->
        <div id="news-content">
            <!--新闻内容-->
            <div id="content-main">
                <!--<p class="news-details-date">2018.10.23</p>-->
                <!--<p class="news-details-title">生物医药创新产业园获授“和谐劳动关系试点园区”</p>-->
                <!--<div class="news-details-img">-->
                    <!--<img src="img/news-details-img.png" alt="">-->
                <!--</div>-->
                <!--<div class="news-details-content">-->
                    <!--生物医药创新产业园多措并举，积极创建劳动关系和谐园区成效显著，被坪山区人力资源局授予“深圳市坪山区和谐劳动关系试点园区”。 坪山区人力资源局、坑梓街道劳动办、园区和谐劳动关系服务站、入驻企业代表及园区调委会成员等30余人出席了于10月18日下午举行的授牌仪式暨园区调解委员会成立大会。区人力资源局刘海波副局长为“深圳市坪山区和谐劳动关系试点......-->
                <!--</div>-->
            </div>
            <!--侧边导航-->
            <div id="sidenav">
                <ul class="nav-item">
                    <li ><a href="news-jtxw.html">集团新闻</a></li>
                    <li ><a href="news-hydt.html">行业动态</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<div id="footer"></div>
<script src="js/jquery.min.js"></script>
<script src="js/main.js"></script>
<script>
    $(document).ready(function () {
        var searchURL = window.location.search;
        console.log(searchURL.length);
        searchURL = searchURL.substring(1, searchURL.length);
        console.log(searchURL.split("&"));
        var newsId = searchURL.split("&")[0].split("=")[1];
        var fromPage = searchURL.split("&")[1].split("=")[1];

        var navItem = document.getElementsByClassName("nav-item");
        var navLi = navItem[0].getElementsByTagName("li");
        var api = "";
        navLi[fromPage].className = "active";
        if(fromPage == 0){
            $(".breadcrumb-list li:last-child").text("集团新闻");
            api = "/Api/New/get_jtxw_content";

        }else{
            $(".breadcrumb-list li:last-child").text("行业动态");
            api = "/Api/New/get_hydt_content";
        }
        // console.log(typeof fromPage);
        var reqUrl = global.location+api;
        var data = {id:newsId};
        getAjax(reqUrl,function (res) {
            console.log(res);
            var html = `
                <p class="news-details-date">${res.date}</p>
                <p class="news-details-title">${res.title}</p>
                <div class="news-details-img">
                    <img src="http://a.freei.cc/data/upload/${res.title_img}" alt="">
                </div>
                <div class="news-details-content">
                    ${res.content}
                </div>
            `;
            $("#content-main").html(html);
        },data)
    })
</script>
</body>
</html>